]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
main: Inhibit animations when software rendered
authorJonas Ådahl <jadahl@gmail.com>
Tue, 1 Oct 2019 10:02:31 +0000 (12:02 +0200)
committerJonas Ådahl <jadahl@gmail.com>
Thu, 20 Feb 2020 11:14:55 +0000 (11:14 +0000)
This was previously decided by gsd-xsettings.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/757

js/ui/main.js

index f0a0ac15f76babd4de8762381df1a8631125d4b1..09f1465e4fb1310898dc1f2a699a2b1b758a9e69 100644 (file)
@@ -161,6 +161,8 @@ function _initializeUI() {
     _loadOskLayouts();
     _loadDefaultStylesheet();
 
+    new AnimationsSettings();
+
     // Setup the stage hierarchy early
     layoutManager = new Layout.LayoutManager();
 
@@ -758,3 +760,13 @@ function showRestartMessage(message) {
     let restartMessage = new RestartMessage(message);
     restartMessage.open();
 }
+
+var AnimationsSettings = class {
+    constructor() {
+        let backend = Meta.get_backend();
+        if (!backend.is_rendering_hardware_accelerated()) {
+            St.Settings.get().inhibit_animations();
+            return;
+        }
+    }
+};